package com.zkthink.ceres.member.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * FileName: IntegralVO
 * Author:   Pepis
 * Date:   2020  2020/8/29 15:38
 * Description:
 **/
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "IntegralVO", description = "会员积分数据")
public class IntegralVO {
    /**
     * 会员ID
     */
    @ApiModelProperty(value = "会员ID")
    @TableField("mid")
    @Excel(name = "会员ID")
    @NotNull(message = "会员id不能为空")
    private Long mid;

    /**
     * 积分值
     */
    @ApiModelProperty(value = "积分值")
    @TableField("integral_num")
    @Excel(name = "积分值")
    private Long integralNum;

    /**
     * 积分类型
     */
    @ApiModelProperty(value = "积分类型 1:购物返积分 2:分享得积分")
    @TableField("type")
    @Excel(name = "积分类型")
    private Integer type;

    @ApiModelProperty(value = "获取时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime createTime;

}
